let arr: number[] = [1, 2, 3, 4, 5]

console.log(arr[7]);

/*
let array: readonly number[] = [1, 2, 3, 4, 5]
// TS 静态类型检测错误，但是 JS 中没有只读类型
array[0] = 123
array[7] = 123
console.log(array);
*/


const abc = 123
// 不能修改 const 的值
// abc = 456


/*
const arr1: number[] = [1, 2, 3, 4, 5]
arr1[0] = 123
// 修改 arr1 存储的地址，不能
arr1 = [6, 7, 8, 9, 0]
*/

/*
let arr2 = [1, 2, 3, 4, 5]  as const
// Cannot assign to '0' because it is a read-only property
arr2[0] = 123
arr2[7] = 123
console.log(arr2);
*/
